{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "d69cfa6a-04b4-493b-a7ea-2404786b84ec",
   "metadata": {},
   "source": [
    "# Introduction to Notebooks"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2d52837b-aae9-470d-96c4-f55249fc7394",
   "metadata": {},
   "source": [
    "This notebook did not appear in the video series, it is meant as a practical guide to help you write your own notebooks and naviagate around them."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b16716b2-c7a0-49cc-9058-ecc3a995d46f",
   "metadata": {},
   "source": [
    "In a Jupyter notebook, we have individual cells, which can be either code cells or markdown cells. \n",
    "\n",
    "The heading and this text are both examples of markdown cells.\n",
    "\n",
    "Let's have a code cell where we import some of the packages we would like to use:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "db526094-a189-4d6f-a462-a21744a26f8c",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-06-20T03:18:12.612940Z",
     "iopub.status.busy": "2023-06-20T03:18:12.612582Z",
     "iopub.status.idle": "2023-06-20T03:18:13.683516Z",
     "shell.execute_reply": "2023-06-20T03:18:13.682915Z",
     "shell.execute_reply.started": "2023-06-20T03:18:12.612909Z"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "import seaborn as sns\n",
    "import matplotlib.pyplot as plt\n",
    "import random"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2f538a3d-e1ed-433f-87fe-18b8fc6e83cf",
   "metadata": {},
   "source": [
    "Now that the code has been imported, we can use it in future cells. The Python interpreter that runs in the background keeps track of all the different cells that have been run.\n",
    "\n",
    "This is similar to the Python REPL (Read-Evaluate-Print loop) that you might have used by typing `python` or `ipython` at the command line, or using a tool such as Spyder."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "6f0517e3-1629-4c7d-b465-6dab98a30729",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-06-20T03:18:13.684216Z",
     "iopub.status.busy": "2023-06-20T03:18:13.684054Z",
     "iopub.status.idle": "2023-06-20T03:18:13.686737Z",
     "shell.execute_reply": "2023-06-20T03:18:13.686240Z",
     "shell.execute_reply.started": "2023-06-20T03:18:13.684207Z"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "# This will get us in trouble later\n",
    "N_SIDES = 6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "490cc071-4413-4706-962e-88dc26595768",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-06-20T03:18:13.687747Z",
     "iopub.status.busy": "2023-06-20T03:18:13.687571Z",
     "iopub.status.idle": "2023-06-20T03:18:13.690797Z",
     "shell.execute_reply": "2023-06-20T03:18:13.690294Z",
     "shell.execute_reply.started": "2023-06-20T03:18:13.687735Z"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "# We can now define a function in here, that can be used in future cells\n",
    "def roll_n_dice(n_dice: int) -> int:\n",
    "    \"\"\"Rolls N six-sided die and returns the total rolled\"\"\"\n",
    "    # Warning -- this will lead us into danger!\n",
    "    rolls = [random.randint(1, N_SIDES) for _ in range(n_dice)]\n",
    "    return sum(rolls)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "994c97e4-85cb-4358-a7a7-5a9f36d7fd59",
   "metadata": {},
   "source": [
    "### Printing in Jupyter notebooks"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "3e2c61f2-479d-49c0-a67c-2154b45b7324",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-06-20T03:18:13.692899Z",
     "iopub.status.busy": "2023-06-20T03:18:13.692740Z",
     "iopub.status.idle": "2023-06-20T03:18:13.696737Z",
     "shell.execute_reply": "2023-06-20T03:18:13.696169Z",
     "shell.execute_reply.started": "2023-06-20T03:18:13.692889Z"
    },
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "8"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# We can show the function from a previous cell is remembered.\n",
    "# Note that the last value in a cell is printed out, if it is not assigned to a variable\n",
    "roll_n_dice(2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "96e06c70-5a34-40a7-85e0-e748d706987b",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-06-20T03:18:13.698198Z",
     "iopub.status.busy": "2023-06-20T03:18:13.698070Z",
     "iopub.status.idle": "2023-06-20T03:18:13.700367Z",
     "shell.execute_reply": "2023-06-20T03:18:13.700027Z",
     "shell.execute_reply.started": "2023-06-20T03:18:13.698187Z"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "# If we want to supress this behaviour, we can add a semi-colon\n",
    "roll_n_dice(2);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "e56ae1ba-971e-4a82-be5e-997dbd22b7b3",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-06-20T03:18:13.701157Z",
     "iopub.status.busy": "2023-06-20T03:18:13.701054Z",
     "iopub.status.idle": "2023-06-20T03:18:13.717701Z",
     "shell.execute_reply": "2023-06-20T03:18:13.717038Z",
     "shell.execute_reply.started": "2023-06-20T03:18:13.701148Z"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "# this won't print out, because the value is stored in a variable\n",
    "result_of_roll = roll_n_dice(2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "d50b9b76-7dd2-4d7b-9d0f-9f5758b7c3ea",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-06-20T03:18:13.718624Z",
     "iopub.status.busy": "2023-06-20T03:18:13.718484Z",
     "iopub.status.idle": "2023-06-20T03:18:13.724279Z",
     "shell.execute_reply": "2023-06-20T03:18:13.722623Z",
     "shell.execute_reply.started": "2023-06-20T03:18:13.718614Z"
    },
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# but we can \"evaluate\" the answer\n",
    "result_of_roll"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "1381ace7-82b8-4172-88a7-6abb964d9e2e",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-06-20T03:18:13.725115Z",
     "iopub.status.busy": "2023-06-20T03:18:13.724994Z",
     "iopub.status.idle": "2023-06-20T03:18:13.730942Z",
     "shell.execute_reply": "2023-06-20T03:18:13.729722Z",
     "shell.execute_reply.started": "2023-06-20T03:18:13.725104Z"
    },
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "4\n"
     ]
    }
   ],
   "source": [
    "# or we can just print it, the way the programming gods intended\n",
    "print(result_of_roll)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "4e767160-dca2-4ef5-8172-723ac596a5bf",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-06-20T03:18:13.732960Z",
     "iopub.status.busy": "2023-06-20T03:18:13.732132Z",
     "iopub.status.idle": "2023-06-20T03:18:13.739649Z",
     "shell.execute_reply": "2023-06-20T03:18:13.738237Z",
     "shell.execute_reply.started": "2023-06-20T03:18:13.732943Z"
    },
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# It is usually better to explicitly print, rather than rely on the odd behavior of the last  executed statement.\n",
    "# \"Explicit is better than implicit!\"\n",
    "# Note this is only printed once\n",
    "result_of_roll\n",
    "result_of_roll"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "5cb5e66b-27a9-4d0e-a5c6-015d971fa0a1",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-06-20T03:18:13.740468Z",
     "iopub.status.busy": "2023-06-20T03:18:13.740327Z",
     "iopub.status.idle": "2023-06-20T03:18:13.745276Z",
     "shell.execute_reply": "2023-06-20T03:18:13.744392Z",
     "shell.execute_reply.started": "2023-06-20T03:18:13.740457Z"
    },
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "4\n",
      "4\n"
     ]
    }
   ],
   "source": [
    "# but by being explicit, it is easier to predict what we get from running a cell\n",
    "print(result_of_roll)\n",
    "print(result_of_roll)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1807a894-79c4-45fe-b165-521dd10612e4",
   "metadata": {},
   "source": [
    "One of the things that Jupyter notebooks allow us to do really well is quickly visualize the result of our code. This example is a little bit contrived, but we can ask \"what are the most common number that occurs if you roll two dice?\"\n",
    "\n",
    "Of course, the avid Euro-gamers among you already know the answer is 7 =)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "7cb6d9d4-2768-4574-8379-c0f8f1278be4",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-06-20T03:18:13.746618Z",
     "iopub.status.busy": "2023-06-20T03:18:13.746296Z",
     "iopub.status.idle": "2023-06-20T03:18:13.877519Z",
     "shell.execute_reply": "2023-06-20T03:18:13.876997Z",
     "shell.execute_reply.started": "2023-06-20T03:18:13.746605Z"
    },
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAkQAAAGdCAYAAADzOWwgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8/fFQqAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAwv0lEQVR4nO3dfVRVdaL/8c9BBMw8B9EBPDdQmusImk+pEVndTEZ8yHJ0pnFCc8qrc7tgqXc5xs2n6IEiM9NIx1Y+tJJqWrcc9TYkYkmNiIpDPhHVHeuw1APDIJzwgcfz+6Mfe80ZtVFD9oH9fq211/Ls7/ec/dl7rfTTPnvvY/N6vV4BAABYWIDZAQAAAMxGIQIAAJZHIQIAAJZHIQIAAJZHIQIAAJZHIQIAAJZHIQIAAJZHIQIAAJYXaHaA9qK5uVknT55Ut27dZLPZzI4DAAAug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9Lkmw2m+bOnaunn35affv2NW67dzqdmjRpkqTvHgcwduxYzZo1S2vXrlVDQ4NSU1M1depU7jADAACSrrAQRUREaM+ePXrkkUeUlpYmr9cr6btikpSUpKysrAsucP4hVq9ercWLF+s///M/VVFRIafTqd/85jdasmSJMee3v/2tzpw5o9mzZ6u6ulq33367cnJyjGcQSdLmzZuVmpqq0aNHGw9mXLVqVavlBAAA7dsVP5ixd+/e+uCDD3T69Gl99dVX8nq96tu3r7p3797q4bp166aVK1dq5cqVl5xjs9mUnp6u9PT0S84JCwvjIYwAAOCSrupJ1ZLUvXt3jRgxojWzAAAAmOKKLqoGAADoiChEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8ihEAADA8vy+EJ04cULTpk1Tjx491KVLFw0cOFAHDhwwxr1er5YsWaJevXqpS5cuSkxM1JdffunzGVVVVUpOTpbdbldoaKhmzpyp2tratt4VAADgp/y6EJ0+fVojR45U586d9cc//lHHjh3Tiy++qO7duxtzMjMztWrVKq1du1aFhYXq2rWrkpKSdP78eWNOcnKyjh49qtzcXG3fvl35+fmaPXu2GbsEAAD8UKDZAb7P888/r6ioKG3YsMFYFxMTY/zZ6/Vq5cqVWrRoke677z5J0htvvKGIiAht2bJFU6dOVUlJiXJycrR//34NHz5ckrR69WqNHz9ey5cvl9PpbNudAgAAfsevzxBt3bpVw4cP1y9+8QuFh4dr6NCheu2114zx48ePy+12KzEx0VjncDgUHx+vgoICSVJBQYFCQ0ONMiRJiYmJCggIUGFh4SW3XVdXJ4/H47MAAICOya8L0V/+8hetWbNGffv21YcffqhHHnlEjz76qDZt2iRJcrvdkqSIiAif90VERBhjbrdb4eHhPuOBgYEK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BANTU1mR2xQ+jVq5f69+/vsy4uLk4ul8ukRB3TggUL9Pjjj2vq1KkaOHCgpk+frnnz5ikjI8PsaB1aZGSkJKm8vNxnfXl5uTGG1tNShr755hvl5ua2ydkhiUJkGq/Xq9TUVL3//vvatWuXYmJizI7UIY0ePVqHDx9WcXGxsQwfPlzJyckqLi5Wp06dzI7YIYwcOfKCx0Z88cUX6t27t0mJOqazZ88qIMD3r+1OnTqpubnZpETWEBMTo8jISOXl5RnrPB6PCgsLlZCQYGKyjqelDH355ZfauXOnevTo0Wbb5iszk6SkpCg7O1t/+MMf1K1bN+N7aIfDoS5dupicruPo1q3bBddlde3aVT169OB6rVY0b9483XbbbXr22Wd1//33a9++fVq3bp3WrVtndrQOZeLEiXrmmWcUHR2tAQMG6M9//rNWrFihhx9+2Oxo7V5tba2++uor4/Xx48dVXFyssLAwRUdHa+7cuXr66afVt29fxcTEaPHixXI6nZo0aZJ5oduh7zvOvXr10s9//nMdPHhQ27dvV1NTk/FvY1hYmIKCgq5tuGt+HxsuStJFlw0bNpgdrcPjtvtrY9u2bd6bbrrJGxwc7I2NjfWuW7fO7Egdjsfj8T722GPe6Ohob0hIiPfGG2/0PvHEE966ujqzo7V7H3300UX/Tp4xY4bX6/3u1vvFixd7IyIivMHBwd7Ro0d7S0tLzQ3dDn3fcT5+/Pgl/2386KOPrnk2m9fLI04BAIC1cQ0RAACwPAoRAACwPAoRAACwPAoRAACwPAoRAACwPAoRAACwPAoRAACwPAoRAACwPAoRAACwPAoRAACwPAoRAACwPAoRAACwvP8Hb17SlCUOFHwAAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# simulate rolling many times\n",
    "many_rolls = [roll_n_dice(n_dice=2) for _ in range(10000)]\n",
    "sns.histplot(\n",
    "    many_rolls, binwidth=1\n",
    ");  # we want the plot, which the function prints, but to ignore some noisey output"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0adda7fc-437a-40a8-8170-442ddc0d6cac",
   "metadata": {},
   "source": [
    "Notebooks do allow for iteration and rapid development. We will see more of this in the next notebook.\n",
    "\n",
    "They also allow us to embed what the results mean in with the results itself."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a589db63-663d-4e77-8521-27b7172bc339",
   "metadata": {},
   "source": [
    "The notebooks also keep track of the order of execution -- if we see the numbers out of order, or missing numbers, it is often a sign to take care, as we will have trouble reasoning about state (and it is safer to restart). \n",
    "\n",
    "There are a lot of convinience methods as well, such as the ability to recall the output from a previous cell. For example, we never stored the value from our first use of our roll function in cell `In[4]`. At least not explicitly -- Jupyter did it for us!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "32a6c851-773d-45df-8dbf-9cc309c0b8b4",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2023-06-20T03:18:14.729164Z",
     "iopub.status.busy": "2023-06-20T03:18:14.728856Z",
     "iopub.status.idle": "2023-06-20T03:18:14.732539Z",
     "shell.execute_reply": "2023-06-20T03:18:14.732101Z",
     "shell.execute_reply.started": "2023-06-20T03:18:14.729149Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "8"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Out[4]"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
